<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="renderer" content="webkit">
<title>大连交通大学在线服务平台</title>
<link href="../css/bootstrap.min.css" rel="stylesheet" />
<link href="../css/font-awesome.min.css" rel="stylesheet" />
<link href="../css/common.css" rel="stylesheet" />
<link href="../images/favicon.ico" rel="shortcut icon" />
<script src="../js/jquery.min.js"></script>
<script src="../js/bootstrap.js"></script>
<script src="../js/bootstrapValidator.min.js"></script>
<script src="../js/language/zh_CN.js"></script>
<script src="../js/common.js"></script>
<script type="text/javascript">
	function deleteMessage(mid) {
		var r = confirm("您确定要删除这条回复么？")
		if (r == true) {
			window.location.href = "message_i_delete2.do?mid=" + mid;
		}
	}
</script>
</head>
<body>
	<div class="center-block-2">
		<div class="list-group">
			<p class="list-group-item active">消息列表：</p>
			<c:choose>
				<c:when test="${not empty user_message_list}">
					<c:forEach items="${user_message_list}" var="message" begin="0" end="5">
						<p>
							您回复了编号为${message.gid}的商品<span style="float: right;"><fmt:formatDate
									value="${message.createtime}" pattern="yyyy.MM.dd HH:MM:ss" /> <a
								href="../index/goods_show2.do?gid=${message.gid}">查看</a>&nbsp;<a
								href="javascript:deleteMessage(${message.mid})">删除</a> </span>
						</p>
						<pre>${message.content}</pre>
					</c:forEach>
				</c:when>
				<c:otherwise>
					<h2>您还没有给任何商品留言。</h2>
				</c:otherwise>
			</c:choose>
		</div>
	</div>
</body>
</html>